﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;

using libReadWrite;
using libCommonClass;

namespace TTServer.Messages
{
    public class DSOpenFileRequestMessage : TTMessage
    {
        private String _temporaryKey = "";

        public String TemporaryKey
        {
            get { return _temporaryKey; }
            set { _temporaryKey = value; }
        }

        private int _type;

        public int Type
        {
            get { return _type; }
            set { _type = value; }
        }

        private String _text;

        public String Text
        {
            get { return _text; }
            set { _text = value; }
        }


        public DSOpenFileRequestMessage()
        {

        }

        public override void ReadMessage(BigEndianReader sr)
        {
            this.TemporaryKey = sr.ReadString();
            this._type = sr.ReadByte();
            this._text = sr.ReadString();
        }

        public override void WriteMessage(BigEndianWriter sw)
        {
            throw new NotImplementedException();
        }

        public override TTMessage Clone()
        {
            return (new DSOpenFileRequestMessage());
        }

        public override int GetMessageID()
        {
            return MessageKind.DS_OPEN_FILE_REQUEST;
        }

        public override string GetMessageName()
        {
            return "DSOpenFileRequestMessage";
        }
    }
}
